package com.dragon.modules.yuegou.query.member;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.member.SetEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 会员隐私设置信息表 0-是 1-否 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-08-07 13:56:48
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class SetQuery extends SetEntity implements Query<SetEntity> {

    /** 主键查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 会员ID查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

    /** 向所有人展示网红店铺排名 0:否 1:是查询条件 */
	@JsonUnwrapped(prefix = "groupToAll")
	private Condition<Boolean> groupToAllCondition;

    /** 向我的粉丝展示网红店铺排名 0:否 1:是查询条件 */
	@JsonUnwrapped(prefix = "groupToFans")
	private Condition<Boolean> groupToFansCondition;

    /** 是否接收所有人消息 0:否 1:是查询条件 */
	@JsonUnwrapped(prefix = "isReceiveAllMsg")
	private Condition<Boolean> isReceiveAllMsgCondition;

    /** 是否接受我关注用户的消息,0:否 1:是查询条件 */
	@JsonUnwrapped(prefix = "isReceiveFollowMsg")
	private Condition<Boolean> isReceiveFollowMsgCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "modifiedTime")
	private Condition<LocalDateTime> modifiedTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public SetQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public SetQuery(SetEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public SetQuery(SetQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if(other.groupToAllCondition != null) {
			this.groupToAllCondition = other.groupToAllCondition.copy();
		}
		if(other.groupToFansCondition != null) {
			this.groupToFansCondition = other.groupToFansCondition.copy();
		}
		if(other.isReceiveAllMsgCondition != null) {
			this.isReceiveAllMsgCondition = other.isReceiveAllMsgCondition.copy();
		}
		if(other.isReceiveFollowMsgCondition != null) {
			this.isReceiveFollowMsgCondition = other.isReceiveFollowMsgCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.modifiedTimeCondition != null) {
			this.modifiedTimeCondition = other.modifiedTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<SetEntity> toQueryWrapper() {
		QueryWrapper<SetEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (groupToAllCondition != null) {
			groupToAllCondition.toWrapper(wrapper, COL_GROUP_TO_ALL);
		}
		if (groupToFansCondition != null) {
			groupToFansCondition.toWrapper(wrapper, COL_GROUP_TO_FANS);
		}
		if (isReceiveAllMsgCondition != null) {
			isReceiveAllMsgCondition.toWrapper(wrapper, COL_IS_RECEIVE_ALL_MSG);
		}
		if (isReceiveFollowMsgCondition != null) {
			isReceiveFollowMsgCondition.toWrapper(wrapper, COL_IS_RECEIVE_FOLLOW_MSG);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (modifiedTimeCondition != null) {
			modifiedTimeCondition.toWrapper(wrapper, COL_MODIFIED_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回主键查询条件
	 * 
	 * @return idCondition 主键查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取主键查询条件
	 * 
	 * @return idCondition 主键查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置主键查询条件
	 * 
	 * @param idCondition 主键查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}
	
	/**
	 * 获取会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置会员ID查询条件
	 * 
	 * @param memberIdCondition 会员ID查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回向所有人展示网红店铺排名 0:否 1:是查询条件
	 * 
	 * @return groupToAllCondition 向所有人展示网红店铺排名 0:否 1:是查询条件
	 */
	public Condition<Boolean> groupToAll() {
		this.groupToAllCondition = new Condition<>();
		return this.groupToAllCondition;
	}
	
	/**
	 * 获取向所有人展示网红店铺排名 0:否 1:是查询条件
	 * 
	 * @return groupToAllCondition 向所有人展示网红店铺排名 0:否 1:是查询条件
	 */
	public Condition<Boolean> getGroupToAllCondition() {
		return groupToAllCondition;
	}

	/**
	 * 设置向所有人展示网红店铺排名 0:否 1:是查询条件
	 * 
	 * @param groupToAllCondition 向所有人展示网红店铺排名 0:否 1:是查询条件
	 */
	public void setGroupToAllCondition(Condition<Boolean> groupToAllCondition) {
		this.groupToAllCondition = groupToAllCondition;
	}

	/**
	 * 构造并返回向我的粉丝展示网红店铺排名 0:否 1:是查询条件
	 * 
	 * @return groupToFansCondition 向我的粉丝展示网红店铺排名 0:否 1:是查询条件
	 */
	public Condition<Boolean> groupToFans() {
		this.groupToFansCondition = new Condition<>();
		return this.groupToFansCondition;
	}
	
	/**
	 * 获取向我的粉丝展示网红店铺排名 0:否 1:是查询条件
	 * 
	 * @return groupToFansCondition 向我的粉丝展示网红店铺排名 0:否 1:是查询条件
	 */
	public Condition<Boolean> getGroupToFansCondition() {
		return groupToFansCondition;
	}

	/**
	 * 设置向我的粉丝展示网红店铺排名 0:否 1:是查询条件
	 * 
	 * @param groupToFansCondition 向我的粉丝展示网红店铺排名 0:否 1:是查询条件
	 */
	public void setGroupToFansCondition(Condition<Boolean> groupToFansCondition) {
		this.groupToFansCondition = groupToFansCondition;
	}

	/**
	 * 构造并返回是否接收所有人消息 0:否 1:是查询条件
	 * 
	 * @return isReceiveAllMsgCondition 是否接收所有人消息 0:否 1:是查询条件
	 */
	public Condition<Boolean> isReceiveAllMsg() {
		this.isReceiveAllMsgCondition = new Condition<>();
		return this.isReceiveAllMsgCondition;
	}
	
	/**
	 * 获取是否接收所有人消息 0:否 1:是查询条件
	 * 
	 * @return isReceiveAllMsgCondition 是否接收所有人消息 0:否 1:是查询条件
	 */
	public Condition<Boolean> getIsReceiveAllMsgCondition() {
		return isReceiveAllMsgCondition;
	}

	/**
	 * 设置是否接收所有人消息 0:否 1:是查询条件
	 * 
	 * @param isReceiveAllMsgCondition 是否接收所有人消息 0:否 1:是查询条件
	 */
	public void setIsReceiveAllMsgCondition(Condition<Boolean> isReceiveAllMsgCondition) {
		this.isReceiveAllMsgCondition = isReceiveAllMsgCondition;
	}

	/**
	 * 构造并返回是否接受我关注用户的消息,0:否 1:是查询条件
	 * 
	 * @return isReceiveFollowMsgCondition 是否接受我关注用户的消息,0:否 1:是查询条件
	 */
	public Condition<Boolean> isReceiveFollowMsg() {
		this.isReceiveFollowMsgCondition = new Condition<>();
		return this.isReceiveFollowMsgCondition;
	}
	
	/**
	 * 获取是否接受我关注用户的消息,0:否 1:是查询条件
	 * 
	 * @return isReceiveFollowMsgCondition 是否接受我关注用户的消息,0:否 1:是查询条件
	 */
	public Condition<Boolean> getIsReceiveFollowMsgCondition() {
		return isReceiveFollowMsgCondition;
	}

	/**
	 * 设置是否接受我关注用户的消息,0:否 1:是查询条件
	 * 
	 * @param isReceiveFollowMsgCondition 是否接受我关注用户的消息,0:否 1:是查询条件
	 */
	public void setIsReceiveFollowMsgCondition(Condition<Boolean> isReceiveFollowMsgCondition) {
		this.isReceiveFollowMsgCondition = isReceiveFollowMsgCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return createdTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return createdTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param createdTimeCondition 查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return modifiedTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> modifiedTime() {
		this.modifiedTimeCondition = new Condition<>();
		return this.modifiedTimeCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return modifiedTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> getModifiedTimeCondition() {
		return modifiedTimeCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param modifiedTimeCondition 查询条件
	 */
	public void setModifiedTimeCondition(Condition<LocalDateTime> modifiedTimeCondition) {
		this.modifiedTimeCondition = modifiedTimeCondition;
	}

}
